import { ApiProperty } from "@nestjs/swagger";
import { IsNotEmpty } from "class-validator";

export class CreateClassifyDto {
    @ApiProperty({
        description:'父级分类'
    })
    @IsNotEmpty({
        message:'父级分类不能为空'
    })
    pid: number;

    @ApiProperty({
        description:'分类名称'
    })
    @IsNotEmpty({
        message:'分类名称不能为空'
    })
    name: string;

    @ApiProperty({
        description:'描述',
        required:false
    })
    desc: string;

    @ApiProperty({
        description:'排序'
    })
    @IsNotEmpty({
        message:'排序不能为空'
    })
    sort: number;

    @ApiProperty({
        description:'状态'
    })
    @IsNotEmpty({
        message:'状态不能为空'
    })
    status: number;

    @ApiProperty({
        description:'图标',
        required:false
    })
    icon: string;
}
